From: Florian Müllner Date: Wed, 18 May 2022 14:43:45 +0000 (+0200) Subject: dbusServices/screencast: Install unconditionally X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~347 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a8c5d778722743942be4da78c0f0e523750d406e;p=gnome-shell.git dbusServices/screencast: Install unconditionally We currently decide at build time whether to include screencast support, based on whether the required gst/pipewire library headers are installed. That check is imprecise, because having the library headers available at build time doesn't necessarily mean that the libraries are there at runtime, or that the corresponding typelibs are installed. It makes more sense to check the requirements at runtime, so prepare for that by installing the screencast service unconditionally, but bail out early if the dependencies aren't met. Part-of: --- diff --git a/js/dbusServices/meson.build b/js/dbusServices/meson.build index eb941ed90..48b7f89fc 100644 --- a/js/dbusServices/meson.build +++ b/js/dbusServices/meson.build @@ -6,15 +6,10 @@ launcherconf.set('libdir', libdir) dbus_services = { 'org.gnome.Shell.Extensions': 'extensions', 'org.gnome.Shell.Notifications': 'notifications', + 'org.gnome.Shell.Screencast': 'screencast', 'org.gnome.ScreenSaver': 'screensaver', } -if enable_recorder - dbus_services += { - 'org.gnome.Shell.Screencast': 'screencast', - } -endif - config_dir = '@0@/..'.format(meson.current_build_dir()) foreach service, dir : dbus_services diff --git a/js/dbusServices/screencast/main.js b/js/dbusServices/screencast/main.js index 4a244264f..0bea967ae 100644 --- a/js/dbusServices/screencast/main.js +++ b/js/dbusServices/screencast/main.js @@ -1,9 +1,13 @@ /* exported main */ +const Config = imports.misc.config; const { DBusService } = imports.dbusService; -const { ScreencastService } = imports.screencastService; function main() { + if (!Config.HAVE_RECORDER) + return; + + const { ScreencastService } = imports.screencastService; const service = new DBusService( 'org.gnome.Shell.Screencast', new ScreencastService());